import '@/assets/fonts/iconfont.css';
import qs from 'qs';
import { history } from 'umi';
import { store } from './utils/utils';

export async function getInitialState() {
  const { qs: queryStr } = history.location.query as any;
  if (queryStr) {
    const platformParam: any = JSON.stringify(qs.parse(decodeURIComponent(window.atob(queryStr))));
    localStorage.setItem('qs', platformParam);
    store.set('qs_info', platformParam);
  }
}
